package com.eda.commous.http;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;

@Data
@NoArgsConstructor
public class ApiError {
    public static final String INTERNAL_ERROR = "internal_error";
    public static final String INVALID_PARAMETER = "invalid_parameter";

    private String error;
    private String message;
    private int status;
    private String path;

    public ApiError(String message) {
        this.message = message;
    }

    public ApiError error(String error) {
        this.error = error;
        return this;
    }
    public ApiError status(int status) {
        this.status = status;
        return this;
    }
}
